package top.leix.springdemo.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 报修表
 * @TableName apply_repair_teacher
 */
@TableName(value ="apply_repair_teacher")
@Data
public class ApplyRepairTeacher implements Serializable {
    /**
     *
     */
    @TableId(value = "applyID", type = IdType.AUTO)
    private Integer applyID;

    /**
     * 申请人账号
     */
    @TableField(value = "applyUserAccount")
    private String applyUserAccount;

    /**
     * 申请人名字
     */
    @TableField(value = "applyUserName")
    private String applyUserName;

    /**
     * Pending-未维修,Repairing-正在修,Finished-使用完毕
     */
    @TableField(value = "repairStatus")
    private Object repairStatus;

    /**
     * 实验室编号
     */
    @TableField(value = "labID")
    private String labID;

    /**
     * 故障描述
     */
    @TableField(value = "fault")
    private String fault;

    /**
     * 维修说明
     */
    @TableField(value = "repairNote")
    private String repairNote;

    /**
     * 创建时间
     */
    @TableField(value = "createTime")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "updateTime")
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableField(value = "isDelete")
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ApplyRepairTeacher other = (ApplyRepairTeacher) that;
        return (this.getApplyID() == null ? other.getApplyID() == null : this.getApplyID().equals(other.getApplyID()))
                && (this.getApplyUserAccount() == null ? other.getApplyUserAccount() == null : this.getApplyUserAccount().equals(other.getApplyUserAccount()))
                && (this.getApplyUserName() == null ? other.getApplyUserName() == null : this.getApplyUserName().equals(other.getApplyUserName()))
                && (this.getRepairStatus() == null ? other.getRepairStatus() == null : this.getRepairStatus().equals(other.getRepairStatus()))
                && (this.getLabID() == null ? other.getLabID() == null : this.getLabID().equals(other.getLabID()))
                && (this.getFault() == null ? other.getFault() == null : this.getFault().equals(other.getFault()))
                && (this.getRepairNote() == null ? other.getRepairNote() == null : this.getRepairNote().equals(other.getRepairNote()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
                && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
                && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getApplyID() == null) ? 0 : getApplyID().hashCode());
        result = prime * result + ((getApplyUserAccount() == null) ? 0 : getApplyUserAccount().hashCode());
        result = prime * result + ((getApplyUserName() == null) ? 0 : getApplyUserName().hashCode());
        result = prime * result + ((getRepairStatus() == null) ? 0 : getRepairStatus().hashCode());
        result = prime * result + ((getLabID() == null) ? 0 : getLabID().hashCode());
        result = prime * result + ((getFault() == null) ? 0 : getFault().hashCode());
        result = prime * result + ((getRepairNote() == null) ? 0 : getRepairNote().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", applyID=").append(applyID);
        sb.append(", applyUserAccount=").append(applyUserAccount);
        sb.append(", applyUserName=").append(applyUserName);
        sb.append(", repairStatus=").append(repairStatus);
        sb.append(", labID=").append(labID);
        sb.append(", fault=").append(fault);
        sb.append(", repairNote=").append(repairNote);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}